package com.hermes.test;

import com.hermes.biz.common.model.user.UserDO;
import com.hermes.biz.manager.user.UserOperateManager;
import com.hermes.common.action.AsynBaseAction;
import com.hermes.common.util.ParameterParserUtil;

public class SaveUser extends AsynBaseAction{

	public UserOperateManager userOperateManager;
	public UserDO userDO;
	public String userid="";
	@Override
	public String execute() throws Exception {
		userid=ParameterParserUtil.getParameter("userid");
		String username = ParameterParserUtil.getParameter("username");
		String email = ParameterParserUtil.getParameter("email");
		String cityName = ParameterParserUtil.getParameter("cityName");
		String intro = ParameterParserUtil.getParameter("intro");
		userDO.setUserName(username);
		userDO.setEmailAddress(email);
		userDO.setAddress(cityName);
		userDO.setUserDesciption(intro);
		
		userOperateManager.updateUserMin(userDO);		
		
		return SUCCESS;
	}
	
	//getters and setters
	public UserOperateManager getUserOperateManager() {
		return userOperateManager;
	}
	public void setUserOperateManager(UserOperateManager userOperateManager) {
		this.userOperateManager = userOperateManager;
	}
	public UserDO getUserDO() {
		return userDO;
	}
	public void setUserDO(UserDO userDO) {
		this.userDO = userDO;
	}

}
